package com.huilan.hgt.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.huilan.hgt.base.BaseModel;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 用户角色表
 * </p>
 *
 * @author ghy
 * @since 2018-11-09
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("T_USER_ROLE")
public class UserRole extends BaseModel<UserRole> {

    private static final long serialVersionUID = 1L;

        /**
     * 主键
     */
         @TableId(value = "ID", type = IdType.AUTO)
    private Integer id;

        /**
     * 角色ID
     */
         @TableField("ROLE_ID")
    private Integer roleId;

        /**
     * 用户ID
     */
         @TableField("USER_ID")
    private Integer userId;


    public static final String ID = "ID";

    public static final String ROLE_ID = "ROLE_ID";

    public static final String USER_ID = "USER_ID";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
